package com.zzyl.common.utils;



public  class MemberContext {


    private static final ThreadLocal<Long> THREAD_LOCAL = new ThreadLocal();

    /**
     * 线程局部变量插入值
     *
     * @param id
     */
    public static void insert(Long id) {
        THREAD_LOCAL.set(id);
    }

    /**
     * 线程局部变量拿值
     *
     * @return
     */
    public static Long get() {
        Long id = THREAD_LOCAL.get();
        return id;
    }

    /**
     * 线程局部变量删除
     */
    public static void delete() {
        THREAD_LOCAL.remove();
    }


}
